package edu.its.dreamteam.daf.dao.ibatis;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import edu.its.dreamteam.daf.beans.BaseBean;
import edu.its.dreamteam.daf.beans.Player;
import edu.its.dreamteam.daf.dao.IPlayerDao;

public class PlayerDaoImpl extends BaseDaoImpl implements IPlayerDao {
	public String getNamespace() {
		return "Player";
	}
	
	public List<Player> getPlayerByRoom(String username, String id_room, String status_draft, String id_club, String id_team) {
		try {
			Map map = new HashMap();
			map.put("username",username);
			map.put("room",id_room);
			map.put("status_draft",status_draft);
			map.put("id_club",id_club);
			map.put("id_team",id_team);
			
			List list = getSqlMapClientTemplate().queryForList(getNamespace()+".getPlayerByRoom", map);
			return list;
		} catch (Exception e) {
			e.printStackTrace();
		}
		return null;
	}
	
}
